<h1>Name: <%=h @product.name %></h1>
<h3>Price <%= @product.price %></h3>
<h3>Description: <%=h @product.description %></h3>
<h3>Restaurant: <%= link_to h(@product.restaurant.name), @product.restaurant %></h3>
<h3>Category: <%= link_to h(@product.product_category.name), @product.product_category %></h3>
<h3>Created by: <%= link_to h(@product.user.login), @product.user if @product.user %></h3>

<h2>Comments (<%= @product.product_comments.count %>)</h2>
    <% if @product.product_comments.empty? %>
        No comments yet
    <% else %>
        <%= render :partial => 'comment', :collection => @product.product_comments %>
    <% end %>
<br/>

<% form_tag :action => :comment, :id => @product do %>
  <%= text_area 'product_comment', 'body', :rows => 5 %><br/>
  <%= submit_tag 'Send comment' %>
<% end %>

<br/>
<%= link_to 'Edit', edit_product_path(@product) %> |
<%= link_to 'Back', products_path %>
